package tcpunit;

public class Parser {
    public static final byte MESSAGE_STX = '{';
    public static final byte MESSAGE_END = '}';

    private String jsonPacket="";

    public String message_parse_char(char b) {
        if (b == MESSAGE_STX) {
            jsonPacket = "{";
        }
        else if (b == MESSAGE_END) {
            jsonPacket = jsonPacket+ "}";
            return jsonPacket;
        }
        else
        {
            jsonPacket = jsonPacket + b;
        }
        return null;
    }
}